/*
    SUSAN® - Sole of Unix Save ANything

   Copyright (C) 2016-2019 Skyatlas co. ltd

   
*/

#ifndef BAREOS_DIRD_NDMP_DMA_RESTORE_COMMON_H_
#define BAREOS_DIRD_NDMP_DMA_RESTORE_COMMON_H_

struct ndm_job_param;
struct ndm_session;
class JobControlRecord;

namespace directordaemon {

void AddToNamelist(struct ndm_job_param* job,
                   char* filename,
                   const char* restore_prefix,
                   char* name,
                   char* other_name,
                   uint64_t node,
                   uint64_t fhinfo);
int SetFilesToRestoreNdmpNative(JobControlRecord* jcr,
                                struct ndm_job_param* job,
                                int32_t FileIndex,
                                const char* restore_prefix,
                                const char* ndmp_filesystem);
int NdmpEnvHandler(void* ctx, int num_fields, char** row);
bool ExtractPostRestoreStats(JobControlRecord* jcr, struct ndm_session* sess);
void NdmpRestoreCleanup(JobControlRecord* jcr, int TermCode);

} /* namespace directordaemon */
#endif  // BAREOS_DIRD_NDMP_DMA_RESTORE_COMMON_H_
